import 'dart:io';

Future<void> main() async {
  var dir = Directory('D:/WorkSpace/flutter_06_dart_isolate/lib/src/io');

  try {
    var dirList = dir.list();

    await for (final FileSystemEntity f in dirList) {
      if (f is File) {
        print('Found file ${f.path}');
      } else if (f is Directory) {
        print('Found dir ${f.path}');
      }
    }
  } catch (e) {
    print(e.toString());
  }
}
